<div class="layui-card-header layui-form model-form" style="height:35px;">
	<button id="uploadModelBtn" type="button" title="上传" class="scene-btn"><i class="fa fa-upload"></i></button>
</div>
<div class="layui-tab layui-tab-card" style="padding: 0px;border: none;margin-top: 0px;height: calc(100% - 36px);">
	<div class="layui-tab-content" style="padding:1px;height: calc(100% - 36px);">
		<div class="layui-tab-item layui-show" style="height: 100%;">
			<div class="layui-card" style="background: none;height: 100%;">
				<div class="layui-card-body" style="height:100%;border-bottom: 0px;padding: 1px;">
				  <table class="formTable layui-form model-form">
				  	<tr>
				  		<td style="padding-left:0px;width: 145px;border: 0px;">
					      <select id="classify-select" name="classify" lay-filter="classify">
					      #for(classify:classifies)
					      	 <option value="#(classify?classify.id:'')">#(classify?classify.name:'')(#(classify?classify.count:0))</option>
					      #end
					      </select>				  		
				  		</td>
				  		<td style="width: 60px;border: 0px;">
							<button id="addModelClassifyBtn" type="button" title="添加分类" class="scene-btn"><i class="layui-icon">&#xe624;</i></button>
							<button id="deleteModelClassifyBtn" type="button" title="删除分类" class="scene-btn"><i class="layui-icon">&#xe640;</i></button>
				  		</td>
				  	</tr>
				  </table>
					<div class="ImageList">
						<div class="content" id="select-model-list">
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="layui-tab-item" style="height: calc(100% - 30px);">
			<div class="layui-card" style="background: none;height: calc(100% - 30px);padding-left: 2px;">
				<div class="layui-card-header" style="height: 35px;padding-left: 10PX;line-height: 38px;">
					<span>分组管理：</span>
					<button id="addSceneLayerBtn" type="button" title="添加分组" class="scene-btn"><i class="layui-icon">&#xe624;</i></button>
					<button id="deleteSceneEmptyLayerBtn" type="button" title="删除所有空分组" class="scene-btn"><i class="layui-icon">&#xe640;</i></button>
				</div>
				<div class="layui-card-body" style="height:calc(100% - 25px);border-bottom: 0px;padding: 1px;">
                	 <ul id="model-sceneLayerTree" class="ztree"  style="height: calc(100% - 16px);"></ul>
				</div>
			</div>
		</div>
	</div>
	<ul class="layui-tab-title layui-tab-title-city"  lay-filter="modelLibraryTab"  style="bottom: 5px; line-height: 35px;padding-left: 5px;">
		<li class="layui-this" style="line-height: 35px;" lay-id="model">模型</li>
		<li style="line-height: 35px;" lay-id="group">分组</li>
	</ul>	
</div>
 
 
<script id="selectModelsScript" type="text/html"> 
#[[
{{#  if(d.count === 0){ }}
  无数据
{{# } else{ }}
    {{#  layui.each(d.data, function(index, item){ }}
		<div class="item" name="{{item.id?item.id:''}}" >
			{{#  if(item.imgUrl!=null && item.imgUrl!='' && item.imgUrl!='null'){ }}
					<img class="Thumbnail " id="{{item.id?item.id:''}}" src="{{d.ctx}}{{item.imgUrl}}">
				{{# } else{ }}
					<img  class="Thumbnail "  id="{{item.id?item.id:''}}" src="{{d.ctx}}/assets/img/thum-default.jpg">
			{{# } }} 
			<div class="title">{{item.name?item.name:''}}</div>
			<div class="cornerText">{{item.type?item.type:''}}</div>
			<button class="IconButton edit" id="{{item.id?item.id:''}}"><i class="iconfont fa fa-pencil-square-o"></i></button>
			<button	class="IconButton delete" id="{{item.id?item.id:''}}"><i class="iconfont fa fa-trash-o"></i></button>
		</div>
    {{#  }); }}
{{#  } }} 
]]#
</script>
 
 <!-- 表单弹窗-->
<script type="text/html" id="modelBizModel"> 
    <form id="modelBizModelForm" lay-filter="modelBizModelForm" class="layui-form model-form" style="padding: 0px;">
        <input name="id" type="hidden"  />
		<table id="modelBizModelFormTableId" class="formTable">
			<tr>
				<td style="border: 0px;">名称</td>
				<td style="text-align: left;border: 0px;">
                	<input name="name"  placeholder="请输入名称" type="text" class="layui-input" />
                </td>
			</tr>
			<tr>
				<td style="width:15px;border: 0px;">缩略图</td>
				<td colspan="" style="text-align: left;width: 60px;border: 0px;">
			    	<img id="BizModel-cover" src="#(ctx)/assets/img/thum-default.jpg" style="width:96px;height:96px;">
				</td>
			</tr>	
			<tr>
				<td colspan="2" style="text-align: right;border: 0px;">
					<button class="layui-btn  layui-btn-sm" lay-filter="modelSubmitBizModelForm" lay-submit>保存</button>
				</td>
			</tr>
		</table>    
    </form>
</script>

<script id="modelBizModelProperty" type="text/html"> 
#[[
{{#  if(d && d.length>0){ }}
    {{#  layui.each(d, function(index, item){ }}
		{{#  if(item.type === 'int'){ }}
			<tr>
				<td>{{item.label?item.label:''}}</td>
				<td >
					<input name="property-{{item.field?item.field:''}}"  placeholder="" autocomplete="off"   type="number" class="layui-input" />
				</td>
			</tr>
		{{#  }  else { }} 
			<tr>
				<td>{{item.label?item.label:''}}</td>
				<td colspan="4" style="text-align: left;">
            		<input name="property-{{item.field?item.field:''}}"  placeholder="请输入{{item.label?item.label:''}}" type="text" class="layui-input" />
            	</td>
			</tr>
		{{#  } }} 
    {{#  }); }}
{{#  } }} 

<tr>
	<td colspan="5" style="text-align: right;">
		<button class="layui-btn layui-btn-sm" lay-filter="modelSubmitBizModelForm" lay-submit>保存</button>
	</td>
</tr>

]]#
</script>

<!-- 表格操作列 -->
<script type="text/html" id="tableBarBizNature">
	<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon">&#xe642;</i></a>
	<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="item" style="margin-left:0px;"><i class="layui-icon">&#xe620;</i></a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del" style="margin-left:0px;"><i class="layui-icon">&#xe640;</i></a>
</script>

<!-- 分类表单弹窗-->
<script type="text/html" id="modelClassifyScript"> 
    <form id="modelClassifyForm" lay-filter="modelClassifyForm" class="layui-form model-form" style="padding: 0px;">
        <input name="id" type="hidden"  />
		<table class="formTable">
			<tr>
				<td>名称</td>
				<td>
                	<input name="name"  placeholder="请输入" placeholder="" autocomplete="off"   type="text" class="layui-input" maxlength="50" lay-verType="tips" lay-verify="required" required  />
                </td>
			</tr>
			<tr>
				<td>标识</td>
				<td>
                	<input name="code"  placeholder="请输入" placeholder="" autocomplete="off"   type="text" class="layui-input" maxlength="100" lay-verType="tips" lay-verify="required" required />
                </td>
			</tr>
			<tr>
				<td>序号</td>
				<td>
                	<input name="sort"  placeholder="请输入" placeholder=""  type="number" class="layui-input" />
                </td>
			</tr>
			<tr>
				<td colspan="5" style="text-align: right;border:none;">
		            <button class="layui-btn layui-btn-sm" lay-filter="submitModelClassifyForm" lay-submit>保存</button>
                </td>
			</tr>												
		</table>    
    </form>
</script>
 